﻿#region Using directives

using System;
using System.Collections;
using System.Data;
using UFSoft.UBF.UI.MD.Runtime;
using UFSoft.UBF.UI.MD.Runtime.Implement;

#endregion

namespace UFIDA.U9.Cust.OTD.ZF.SHXM3003.OTDListUI.FOChangeDocTypeBListUIModel
{
	[Serializable]
	public partial class FOChangeDocTypeBListUIModelModel : UIModel
	{
		#region Constructor
		public FOChangeDocTypeBListUIModelModel() : base("FOChangeDocTypeBListUIModel")
		{
			InitClass();
			this.SetResourceInfo("1bd5b898-e48f-4348-bcfe-59d30f04ba08");
            try{
			    AfterInitModel();
            }catch(Exception exception){
              IUIModel model = this;
		      this.ErrorMessage.SetErrorMessage(ref model,exception);
			}
		}

		//just for Clone 
		private FOChangeDocTypeBListUIModelModel(bool isInit) : base("FOChangeDocTypeBListUIModel")
		{}
		protected override IUIModel CreateCloneInstance()
		{
			return new FOChangeDocTypeBListUIModelModel(false);
		}
		#endregion
		#region member
		#region views
		private FOChangeDocTypeView viewFOChangeDocType;			
		#endregion
		
		#region links
		#endregion
		
		#region properties
		#endregion
		#endregion

		#region property
		public FOChangeDocTypeView FOChangeDocType
		{
			get { return (FOChangeDocTypeView)this["FOChangeDocType"]; }
		}
		
		#region RealViews
		#endregion
		
	
		#endregion

		#region function
		private void InitClass()
		{
			this.viewFOChangeDocType = new FOChangeDocTypeView(this);
			this.viewFOChangeDocType.SetResourceInfo("57011e40-a127-411c-8539-a5a304577c42");
			this.Views.Add(this.viewFOChangeDocType);			

			
		}

		public override string AssemblyName
		{
			get { return "UFIDA.U9.Cust.OTD.ZF.SHXM3003.OTDListUI"; }
		}
		
		#endregion
		private void OnValidate_DefualtImpl()
    {
    }

	}


	[Serializable]
	public partial class FOChangeDocTypeView : UIView
	{
		#region Constructor
		public FOChangeDocTypeView(IUIModel model) : base(model,"FOChangeDocType","UFIDA.U9.Cust.OTD.ZF.SHXM3003.OTDBE.FOChangeTypeBE.FOChangeDocType", true)
		{
			InitClass();
		}
		//构造空实例,不进行初始化.目前为Clone使用.
		private FOChangeDocTypeView():base(null,"FOChangeDocType","UFIDA.U9.Cust.OTD.ZF.SHXM3003.OTDBE.FOChangeTypeBE.FOChangeDocType", true)
		{
		}
		protected override IUIView CreateCloneInstance()
		{
			return new FOChangeDocTypeView();
		}
		#endregion

		#region fiels property filter
		public IUIField FieldID
		{
			get { return this.Fields["ID"]; }
		}


		[Obsolete("请使用CurrentFilter属性，这个方法有可能会导致强弱类型转换出错")]
		public FOChangeDocTypeDefaultFilterFilter DefaultFilter
		{
			get { return (FOChangeDocTypeDefaultFilterFilter)this.CurrentFilter; }
		}
		#endregion

		#region Init
		private void InitClass()
		{
			UIModelRuntimeFactory.AddNewUIField(this,"ID", typeof(Int64), false,"","System.Int64", "ID", true,true, false, "",false,(UIFieldType)1,"ba391065-6c27-4c82-acc8-b52b1c93a910","9a16fc78-ff49-4f87-9772-252825af9966");


			this.CurrentFilter = new FOChangeDocTypeDefaultFilterFilter(this);
		}
		#endregion
		
		#region override method
		protected override IUIRecord BuildNewRecord(IUIRecordBuilder builder)
		{
			return new FOChangeDocTypeRecord(builder);
		}
		#endregion

		#region new method
		public new FOChangeDocTypeRecord FocusedRecord
		{
			get { return (FOChangeDocTypeRecord)base.FocusedRecord ; }
			set { base.FocusedRecord = value ; }
		}
		public new FOChangeDocTypeRecord AddNewUIRecord()
		{	
			return (FOChangeDocTypeRecord)base.AddNewUIRecord();
		}
		public new FOChangeDocTypeRecord NewUIRecord()
		{	
			return (FOChangeDocTypeRecord)base.NewUIRecord();
		}
		#endregion 

	}

	[Serializable]
	public class FOChangeDocTypeRecord : UIRecord
	{
		#region Constructor
		public FOChangeDocTypeRecord(IUIRecordBuilder builder):base(builder)
		{
		}
		private FOChangeDocTypeView uiviewFOChangeDocType
		{
			get { return (FOChangeDocTypeView)this.ContainerView; }
		}
		protected override IUIRecord CreateCloneInstance(IUIRecordBuilder builder)
		{
			return new FOChangeDocTypeRecord(builder);
		}
		#endregion

		#region property
		
		
		public  Int64 ID
		{
			get{
				//object value = this[this.uiviewFOChangeDocType.FieldID] ;
				//return (Int64)value;
				return GetValue<Int64>(this.uiviewFOChangeDocType.FieldID);
			}
			set{
				this[this.uiviewFOChangeDocType.FieldID] = value;
			}
		}
		#endregion
	}
	
	[Serializable]
	public class FOChangeDocTypeDefaultFilterFilter : UIFilter
	{
		#region Constructor
		public FOChangeDocTypeDefaultFilterFilter(IUIView view) 
			: base("DefaultFilter",view,@"",@"")
		{
			InitClass();
		}
		//for Clone Constructor
		private FOChangeDocTypeDefaultFilterFilter()
			: base("DefaultFilter",null,"","")
		{}
		protected override IUIFilter CreateCloneInstance()
		{
			return new FOChangeDocTypeDefaultFilterFilter();
		}
		#endregion

		#region property
		#endregion
		
		#region function
		private void InitClass()
		{
		}
		#endregion

	}



}